package com.godyao.mall.rabbitmq.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GeneratorType;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

/**
 * @author godyao
 * @date 2022/4/3
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
public class MqMsg {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "snow-flake")
    @GenericGenerator(name = "snow-flake", strategy = "com.godyao.mall.rabbitmq.CustomIdGenerator")
    private Long id;

    private String msg;

    private Date createTime;

    private Date updateTime;

    private Integer status;

    private String exchange;

    private String queue;

    private String routingKey;
}
